package iterables;

import java.util.Iterator;
import java.util.StringTokenizer;

public class IterableDeCadena extends StringTokenizer implements Iterable<String> {

	public IterableDeCadena(String s, String d){   
		super(s,d);  
	}
	public IterableDeCadena(String s, String d, boolean b){   
		super(s,d,b);  
	}
	public Iterator<String> iterator() {
		return new IteradorDeCadena();
	}

	private class IteradorDeCadena implements Iterator<String> {
		public boolean hasNext() { 
			return hasMoreTokens(); 
		}
		public String next() {
			return  nextToken();  
		}
		public void remove() {
		}
	}

}

